package com.xingfly.model;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 事件
 * 发post,发动态，关注了某人
 * Created by SuperS on 2016/12/6.
 */
@Entity
@Table(name = "xf_event")
public class Event extends BaseModel {
    //创建事件的用户
    @JoinColumn(name = "user_id")
    @OneToOne
    private User user;

    //事件对象类型
    private int objectType;
    //事件对象id
    private Long objectId;
    //事件标题
    private String title;
    //事件概要
    private String summary;
    //事件内容
    private String content;
    //事件喜欢数
    private int likeCount;
    //事件分享数
    private int shareCount;
    //事件评论数
    private int commentCount;
    //是否喜欢
    private boolean isLike;


    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(int likeCount) {
        this.likeCount = likeCount;
    }

    public int getShareCount() {
        return shareCount;
    }

    public void setShareCount(int shareCount) {
        this.shareCount = shareCount;
    }

    public int getObjectType() {
        return objectType;
    }

    public void setObjectType(int objectType) {
        this.objectType = objectType;
    }

    public Long getObjectId() {
        return objectId;
    }

    public void setObjectId(Long objectId) {
        this.objectId = objectId;
    }

    public int getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(int commentCount) {
        this.commentCount = commentCount;
    }

    public boolean isLike() {
        return isLike;
    }

    public void setLike(boolean like) {
        isLike = like;
    }
}
